package com.property.biz.Impl;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;

import com.property.biz.ComplaintBiz;
import com.property.dao.ComplaintDao;
import com.property.entity.Complaint;
import com.property.entity.ComplaintDispose;

@Service("complaintBiz")
@Scope("prototype")
public class ComplaintBizImpl implements ComplaintBiz {

	@Autowired
	private ComplaintDao complaintDao;

	public int getUntreatedCount() {
		return complaintDao.getUntreatedCount();
	}

	public List<Complaint> getAll(int index, int size, String type, int id) {
		return complaintDao.getAll(index, size, type, id);

	}

	public Complaint ComAll(int id) {
		
		return complaintDao.ComAll(id);
	}

	public int comCount(String type, int id) {
		return complaintDao.comCount(type, id);
	}

	public void updateCom(int id) {
		complaintDao.updateCom(id);
		
	}

	public int getTSCount(int communityid) {

		return complaintDao.getTSCount(communityid);
	}

	public void addComplaint(Complaint complaint) {
		complaintDao.addComplaint(complaint);
		 
	}

	public List<ComplaintDispose> getByOid(int oid,int index,int size) {
		return complaintDao.getByOid(oid, index, size);
	}

	public void deleteComp(int oid) {
	   complaintDao.deleteComp(oid);
		
	}

	public List<Complaint> getComplaints(int oid) {
		
		return complaintDao.getComplaints(oid);
	}
	
	public ComplaintDispose getByCdid(int id) {
		return complaintDao.getByCdid(id);
	}

	public void delComplaint(int cid) {
		complaintDao.delComplaint(cid);
	}

}
